package com.wetool.wechat.model.official.template;


import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * 微信模板消息
 */
@Getter
@Setter
public class TemplateMessageRequest {

    /**
     * 目标用户的openId
     */
    @JsonProperty(value = "touser")
    private String openId;

    /**
     * 模板id
     */
    @JsonProperty(value = "template_id")
    private String templateId;

    /**
     * 消息点击跳转地址
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @JsonProperty(value = "url")
    private String url;

    /**
     *
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @JsonProperty(value = "miniprogram")
    private MiniProgramItem miniProgramItem;

    /**
     *
     */
    @JsonProperty(value = "data")
    private Map<String, MessageData> data;
}
